﻿using System;
using System.IO;
using Soveryn.Commerce.BaseClasses;

namespace Soveryn.Commerce.Pages
{
    public partial class DeleteFile : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            if (!String.IsNullOrEmpty(Request.QueryString["EmployeeToken"]))
            {
                if (PageBaseClass.EmployeeExternalSessionValid(Request.QueryString["EmployeeToken"]))
                {

                    FileInfo fi = new FileInfo(Server.MapPath(Request.QueryString["FilePath"]));
                    fi.Delete();

                }
            }

        }
    }
}